<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>UMSocialSnsService Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<meta name="viewport" content="width=550" />
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.1 (build 840)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">UMSocial_SDK </a></h1>
				<a id="developerHome" href="../index.html">umeng</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">UMSocialSnsService Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	
	
	<option value="class_methods">Class Methods</option>
	
	<option value="//api/name/applicationDidBecomeActive">&nbsp;&nbsp;&nbsp;&nbsp;+ applicationDidBecomeActive</option>
	
	<option value="//api/name/handleOpenURL:wxApiDelegate:">&nbsp;&nbsp;&nbsp;&nbsp;+ handleOpenURL:wxApiDelegate:</option>
	
	<option value="//api/name/presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:">&nbsp;&nbsp;&nbsp;&nbsp;+ presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:</option>
	
	<option value="//api/name/presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:">&nbsp;&nbsp;&nbsp;&nbsp;+ presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:</option>
	
	<option value="//api/name/sharedInstance">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedInstance</option>
	
	
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				



<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
</ul></li>







<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/applicationDidBecomeActive">applicationDidBecomeActive</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/handleOpenURL:wxApiDelegate:">handleOpenURL:wxApiDelegate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:">presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:">presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedInstance">sharedInstance</a></span></li>
	
</ul></li>




			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="UMSocialSnsService Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">UMSocialSnsService Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">UMSocialSnsService.h<br />UMSocialSnsService.m</td>
</tr>
						</tbody></table></div>
					
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						
						

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/sharedInstance">+&nbsp;sharedInstance</a></code>
		<span class="tooltip"><p>得到单例对象的类方法</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/applicationDidBecomeActive">+&nbsp;applicationDidBecomeActive</a></code>
		<span class="tooltip"><p>当应用从后台唤起时，应调用此方法，需要完成退出当前登录状态的功能</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/handleOpenURL:wxApiDelegate:">+&nbsp;handleOpenURL:wxApiDelegate:</a></code>
		<span class="tooltip"><p>处理app的URL方法</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:">+&nbsp;presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:</a></code>
		<span class="tooltip"><p>弹出一个分享列表的UITableViewController</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:">+&nbsp;presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:</a></code>
		<span class="tooltip"><p>弹出一个分享列表的类似iOS6的UIActivityViewController控件</p></span>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					
					
					<div class="section section-methods">
						<a title="Class Methods" name="class_methods"></a>
						<h2 class="subtitle subtitle-methods">Class Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/applicationDidBecomeActive" title="applicationDidBecomeActive"></a>
	<h3 class="subsubtitle method-title">applicationDidBecomeActive</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>当应用从后台唤起时，应调用此方法，需要完成退出当前登录状态的功能</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (void)applicationDidBecomeActive</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">UMSocialSnsService.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/handleOpenURL:wxApiDelegate:" title="handleOpenURL:wxApiDelegate:"></a>
	<h3 class="subsubtitle method-title">handleOpenURL:wxApiDelegate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>处理app的URL方法</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (BOOL)handleOpenURL:(NSURL *)<em>url</em> wxApiDelegate:(id&lt;WXApiDelegate&gt;)<em>wxApiDelegate</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>传入的url</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>wxApiDelegate 实现微信代理对象</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>如果你要处理自己的url，你可以把这个方法的实现，复制到你的代码中：</p>

<p>if ([url.description hasPrefix:@&ldquo;sina&rdquo;]) {</p>

<pre><code>return (BOOL)[[UMSocialSnsService sharedInstance] performSelector:@selector(handleSinaSsoOpenURL:) withObject:url];
</code></pre>

<p>}
else if([url.description hasPrefix:@&ldquo;wx&rdquo;]){</p>

<pre><code>return [WXApi handleOpenURL:url delegate:(id &lt;WXApiDelegate&gt;)[UMSocialSnsService sharedInstance]];
</code></pre>

<p>}</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">UMSocialSnsService.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:" title="presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:"></a>
	<h3 class="subsubtitle method-title">presentSnsController:appKey:shareText:shareImage:shareToSnsNames:delegate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>弹出一个分享列表的UITableViewController</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (void)presentSnsController:(UIViewController *)<em>controller</em> appKey:(NSString *)<em>appKey</em> shareText:(NSString *)<em>shareText</em> shareImage:(UIImage *)<em>shareImage</em> shareToSnsNames:(NSArray *)<em>snsNames</em> delegate:(id&lt;UMSocialUIDelegate&gt;)<em>delegate</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>controller</em></dt>
			<dd><p>在该controller弹出分享列表的UIActionSheet</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>appKey</em></dt>
			<dd><p>友盟appKey</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>shareText</em></dt>
			<dd><p>分享编辑页面的内嵌文字</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>shareImage</em></dt>
			<dd><p>分享内嵌图片,用户可以在编辑页面删除</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>snsNames</em></dt>
			<dd><p>你要分享到的sns平台类型，该NSArray值是<code></code>UMSocialSnsPlatformManager<code>.h</code>定义的平台名的字符串常量，有UMShareToSina，UMShareToTencent，UMShareToRenren，UMShareToDouban，UMShareToQzone，UMShareToEmail，UMShareToSms等</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>delegate</em></dt>
			<dd><p>实现分享完成后的回调对象，如果不关注分享完成的状态，可以设为nil</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">UMSocialSnsService.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:" title="presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:"></a>
	<h3 class="subsubtitle method-title">presentSnsIconSheetView:appKey:shareText:shareImage:shareToSnsNames:delegate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>弹出一个分享列表的类似iOS6的UIActivityViewController控件</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (void)presentSnsIconSheetView:(UIViewController *)<em>controller</em> appKey:(NSString *)<em>appKey</em> shareText:(NSString *)<em>shareText</em> shareImage:(UIImage *)<em>shareImage</em> shareToSnsNames:(NSArray *)<em>snsNames</em> delegate:(id&lt;UMSocialUIDelegate&gt;)<em>delegate</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>controller</em></dt>
			<dd><p>在该controller弹出分享列表的UIActionSheet</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>appKey</em></dt>
			<dd><p>友盟appKey</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>shareText</em></dt>
			<dd><p>分享编辑页面的内嵌文字</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>shareImage</em></dt>
			<dd><p>分享内嵌图片,用户可以在编辑页面删除</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>snsNames</em></dt>
			<dd><p>你要分享到的sns平台类型，该NSArray值是<code></code>UMSocialSnsPlatformManager<code>.h</code>定义的平台名的字符串常量，有UMShareToSina，UMShareToTencent，UMShareToRenren，UMShareToDouban，UMShareToQzone，UMShareToEmail，UMShareToSms等</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>delegate</em></dt>
			<dd><p>实现分享完成后的回调对象，如果不关注分享完成的状态，可以设为nil</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">UMSocialSnsService.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/sharedInstance" title="sharedInstance"></a>
	<h3 class="subsubtitle method-title">sharedInstance</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>得到单例对象的类方法</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (UMSocialSnsService *)sharedInstance</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p><code>UMSocialSnsService</code>的单例对象</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">UMSocialSnsService.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 umeng. All rights reserved. (Last updated: 2014-02-08)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>